﻿using System.ComponentModel.DataAnnotations;
using AutoTest.Domain.Enums;

namespace AutoTest.Business.Dto.UserInfo
{
    /// <summary>
    /// 添加用户
    /// </summary>
    public class UserInfoAddDto
    {

        ///<summary>
        /// 电话
        ///</summary>
        [Display(Name = "电话")]
        [Required(AllowEmptyStrings =false,ErrorMessage ="{0}不能为空")]
        public string Phone { get; set; } = string.Empty;
        /// <summary>
        /// 邮箱
        /// </summary>
        [Display(Name = "邮箱")]
        public string Email { get; set; } = "";
        /// <summary>
        /// 用户名
        /// </summary>
        [Display(Name = "用户名")]
        public string UserName { get; set; } = "";

        /// <summary>
        /// 密码
        /// </summary>
        [Display(Name = "密码")]
        public string Password { get; set; }=string.Empty;
        /// <summary>
        /// 性别
        /// </summary>
        [Display(Name = "性别")]
        public EnumSex? Sex { get; set; } = EnumSex.Unknown;
        /// <summary>
        /// 状态
        /// </summary>
        [Display(Name = "状态")]
        public EnumStatus Status { get; set; } = EnumStatus.Disable;
        /// <summary>
        /// 开通商品
        /// </summary>
        public List<UserProductRelationDto> Products { get; set; } = [];
    }
}
